<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\models\User;

/* @var $this yii\web\View */
/* @var $model app\models\User */
/* @var $uploadForm app\models\UploadForm */
/* @var $form yii\widgets\ActiveForm */
$this->title = '创建机器人';
$this->params['breadcrumbs'][] = ['label' => '用户', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-create">

    <h1><?= Html::encode($this->title) ?></h1>

    <div class="user-form">

        <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

        <?= $form->field($uploadForm,'file')->fileInput()?>

        <?= $form->field($model, 'sex')->dropDownList(User::dropdown('sex'),['prompt'=>'性别']) ?>

        <?= $form->field($model, 'province')->dropDownList([],['id'=>'province'])?>

        <?= $form->field($model, 'city')->dropDownList([],['id'=>'city']) ?>

        <?= $form->field($model, 'county')->dropDownList([],['id'=>'county']) ?>

        <div class="form-group">
            <?= Html::submitButton('创建', ['class' => 'btn btn-success']) ?>
        </div>

        <?php ActiveForm::end(); ?>

    </div>


</div>
<?php $this->beginBlock('js')?>
<?=Html::jsFile('@admin/js/area.js')?>
    <script>
        _init_area();
    </script>
<?php $this->endBlock();?>